package com.diudiutechnology.www.yadiudiu.yadiudiu.main.MyActivity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.GridView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.diudiutechnology.www.yadiudiu.yadiudiu.mine.MyAdapter.CalendarViewAdapter;
import com.diudiutechnology.www.yadiudiu.R;
import com.diudiutechnology.www.yadiudiu.util.utils.Utils;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/8/31.
 * 首页签到
 */

public class HomePageSignActivity extends Activity implements View.OnClickListener {
    @Bind(R.id.retur)
    LinearLayout retur;

    @Bind(R.id.gv_calendar)
    GridView gvCalendar;
    @Bind(R.id.tv_current_time)
    TextView tvCurrentTime;
    Context context;
    private CalendarViewAdapter mCalendarViewAdapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home_page_sign);
        ButterKnife.bind(this);
        context=this;
        initView();
    }

    private void initView() {
        retur.setOnClickListener(this);
        tvCurrentTime.setText(Utils.getTime(System.currentTimeMillis()));
        mCalendarViewAdapter = new CalendarViewAdapter(this, Utils.getCurrentMonthDay());
        gvCalendar.setAdapter(mCalendarViewAdapter);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.retur:
                finish();
                break;
        }
    }
}
